package com.sayice.robotconflict.common.exception;

/**
 * 自定义异常
 *
 * @author shubing
 */
public class AppException extends RuntimeException {
    private static final long serialVersionUID = 1L;
    
    /**
     * 错误码
     */
    private Integer errorCode;
    
    public AppException() {
    }
    
    public AppException(String message) {
        super(message);
    }
    
    public AppException(String message, Throwable cause) {
        super(message, cause);
    }
    
    public AppException(Throwable cause) {
        super(cause);
    }
    
    public AppException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
    }
    
    public AppException(Integer errorCode, String message) {
        super(message);
        this.errorCode = errorCode;
    }
    
    public AppException(Integer errorCode, String message, Throwable cause) {
        super(message, cause);
        this.errorCode = errorCode;
    }
    
    public AppException(Integer errorCode, Throwable cause) {
        super(cause);
        this.errorCode = errorCode;
    }
    
    public Integer getErrorCode() {
        return errorCode;
    }
    
    public void setErrorCode(Integer errorCode) {
        this.errorCode = errorCode;
    }
}
